home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
superv22.zip
/
SUPER.DOC
< prev
next >
Wrap
Text File
|
1986-12-18
|
22KB
|
551 lines
SUPERCOM resident Int 14 driver
Version 2.0
(C) Copyright 1986, 1987
Doctor Debug
Pittsburgh, Pa
All Rights Reserved
As with all the Doctor's software, SUPERCOM
has been tested and by all indications works as
described under all reasonable conditions.
However, the good doctor cannot be responsible
for damages, heartbreak, outbreaks of war or
acts of God caused by the use of this
software. As it is Shareware, distribution
of this package is encouraged so long as the
programs and documentation are unaltered.
Please read the contribution information at
the end of this document.
This document will give the command syntax and function
descriptions for SUPERCOM version 2.0. It will also highlight the
differences between Version 1 and Version 2.
WHAT IS SUPERCOM AND WHAT IS IT DOING ON MY COMPUTER?
SUPERCOM is a replacement for the normal BIOS interrupt 14, which
handles asynchronous communications. The support through BIOS is
so pitifully inadequate that it is almost impossible to write
secure, reliable communications software using the four functions
they give you. SUPERCOM gives you 16 useful functions and a
variable length receive buffer. It has been designed with
interface to high level languages in mind, and in fact includes
Turbo Pascal procedures to utilize all of SUPERCOM's functions.
HOW DO I RUN SUPERCOM?
SUPER.COM must be run before any applications program can use it,
for it attaches itself to BIOS.
.pa
COMMAND SYNTAX:
SUPER [/I] [/Cnn] [/X]
WHERE:
/I indicates that SUPERCOM is to function in Interrupt
Mode. The default is Polling Mode, which was the only
method available in version 1. (See below for a
description of these modes).
/Cnn sets the size, in K, of SUPERCOM's receive
buffer. (Default = 4K). SuperCom will accept anything
from 1 to 99, but buffer sizes above 60K will cause
unpredictable results.
/X enables XON/XOFF processing. If SUPERCOM receives an
XOFF (^S) over the active COM port, all transmits are
suspended until an XON (^Q) is received. This is an
extremely useful device as well as an extremely
dangerous one. If no XON is received, your system is
hung. Typing an Alt Q from the keyboard will clear this
condition. NOTE: The XON and XOFF characters are not
placed in the receive buffer.
Note that simply typing SUPER and pressing Enter will load
SUPERCOM in exactly the same configuration as Version 1.
You will be given a message which indicates that SUPERCOM is
loaded and your system prompt will return. At this point your
computer will behave entirely normal. It is like a big car with a
Turbocharger in it - the extra power isn't used until you
activate it.
You activate SUPERCOM and utilize its many features via
normal INT 14 calls. Below is a lit of the functions available
and what they do.
Function 0 - Set Communications Parameters
Entry: AH = 0
AL = Initialization parameters
(Same as original INT 14)
Return: Status returned in AX
Notes: This works exactly like the old INT 14 function 0,
and in fact is called by SUPERCOM function 12. Do
not use this function to initialize the port; use
function 12. However, if you wish to change the
line parameters (baud rate, parity, etc) after the
SUPERCOM port has been opened, use this function
to prevent disconnection.
.pa
Function 1 - Send Character
Entry: AH = 1
AL = Character to Send
Return: High bit of AL set if error occurred
Notes: There is no fundamental difference between this
function and the original INT 14 Function 1.
Function 2 - Receive Character
Entry: AH = 2
Return: AL has character.
AH is zero unless error occurred.
Notes: This will timeout after about 6 seconds.
Function 3 - Port Status
Entry: AH = 3
Return: Status returns in AH and AL as in old INT 14.
Function 4 - Clear Buffer
Entry: AH = 4
Return: None
Note: Empties the receive buffer.
Function 5 - Block Receive
Entry: AH = 5
DX = Port (0 or 1)
CX = Size of desired block
ES:BX = address for data
Return: Specified number of characters placed in [ES:BX]
AH nonzero if error occurred.
Note: Will time out as in Function 2. The Checksum
calculation (formerly returned in CX) is no longer
supported.
Function 6 - Block Send
Entry: DX = port (0 or 1)
CX = size of block
ES:BX = Address of data to send
Return: AX will have status codes
.pa
Function 7 - Buffer status
Entry: AH = 7
Return: BX = number of characters waiting in receive
buffer
Function 8 - Get Character
Entry: AH = 8
DX = Port (0 or 1)
Return: If character is available in buffer, it is
returned in AL. If no characters are waiting, AL
returns as 0 (nul).
Note: Character is removed from the receive buffer. If
there is a chance there will be nuls in the
receive data, use function 7 to determine whether
a character is available. This is the equivalent
of INKEY$ for the Com port.
Function 9 - Set Port
Entry: AH = 9
DX = Port (0 or 1) to buffer
Return: none
Note: Use this to switch ports in mid-stream. Use
Function 12 to set the port initially.
Function 10 (0AH) - Enable/Disable SUPERCOM
Entry: AH = 0A
Return: None
Note: Used internally - use Functions 12 and 13 to
accomplish this function. This function toggles
whether SUPERCOM is active or inactive. If
inactive, all INT14 calls go to original BIOS
interrupt.
Function 11 (0BH) - SUPERCOM Active Status
Entry: AH = 0B
Return: AH = 1 if SUPERCOM Active
AH = 0 if SUPERCOM Inactive (passing calls to
BIOS)
Note: Again, mainly for internal use, but if you need a
quick check use this.
.pa
Function 12 (0CH) - Open SUPERCOM port
Entry: AH = 0C
AL = Initialization Parameters (as in Function 0)
DX = Port (0 or 1)
Return: AX will have status codes
Notes: This is how you activate SUPERCOM and enable all
the features. If you need to change some line
parameters (baud rate, parity, etc.) while the
SUPERCOM port is open, use Function 0.
Function 13 (0DH) - Close SUPERCOM port
Entry: AH = 0DH
DX = Port (0 or 1)
Return: None
Notes: This disables buffering of incoming characters and
removes either the timer interrupt or the Comm interrupt from the
system interrupt chain. Be sure your program performs a Close
before exiting, especially if you are using Receive Polling.
Function 14 (0EH) - Peek Buffer
Entry: AH = 0E
Return: If a character is available in the buffer it is
returned in AL, but IS NOT removed from the
buffer. If no character is available, AL returns